<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			window.onload = function(){
				var d1 = document.getElementById("d1");
				var d2 = document.getElementById("d2");
				d1.innerHTML = "<span class='red'>这是html</span>";
				d2.innerText = "<span class='red'>这是html</span>";
			}
		</script>
	</head>
	<body>
		<div id="d1"></div>
		<div id="d2"></div>
	</body>
</html>
